Release 10.1A: OpenEdge Getting Started:
Core Business Services
Audit data table schema
You cannot modify the schema of the audit tables. You can add a child table to any of the audit tables (by using a foreign key relationship to a record field in the existing audit data table); however, there will be no archiving or security extended to the child table.
Figure A–1 illustrates the auditing metadata.
Figure A–1: OpenEdge Release 10.1A auditing metadata
![]()
The audit tables fall into two categories: those that hold the audit data and those that hold the audit policy configuration.
The following tables hold audit data:
The following tables hold audit policy configuration:
The following tables support auditing specifically or support auditing and other functionality:
_client-session— Records additional login session information that further defines the login domain authentication system._db-detail— Records the binding between a database’s identity (UUID) and the encrypted MAC key used for audit data and archive integrity._db-option— Records the database and application options for controlling database and application operations such as auditing and security.In addition, the existing
_dbtable (which contains database-wide information) has been modified for auditing.Table A–1 lists and describes all of the audit tables.
Table A–2 through Table A–12 describe each of the audit tables individually.
Table A–2: _aud-audit-data table Field name Description Datatype Format_Audit-data-guid A globally unique ID that identifies the audit data record. The ID must be globally unique to support the aggregation of audit data across multiple databases and, potentially, applications.The primary purpose of this unique ID is to provide a foreign key for the child table_aud-audit-data-valuethat is used to store individual, modified field values for database events.The value is always a 22-character, BASE-64 encoded UUID. CHARACTER X(28)_Database-connection-id For database connections, this is the ID that is used to track audit events for the duration of a specific database connection.This is relevant only to database create, update, and delete events. CHARACTER X(28)_Client-session-uuid A unique ID for the client login session; used to tie together all the audit data for a specific session. The value is always a 22-character, BASE-64 encoded UUID.For Progress AppServer sessions or connections that do not have a valid authenticated client session record in the_aud-client-sessiontable, this field would refer to the UUID of the AppServer. This field is not used by eitherSETUSERID( )or the-Uand-Pparameters.This field is indexed together with the database connection ID field, so to obtain the details for a specific session, the database connection information must also be specified for efficiency.Multiple client sessions could occur within a single database connection. CHARACTER X(28)_User-id The authenticated user who has been authorized to perform a database operation or application function.This user ID can also include the domain the user was authenticated by. For example:fred@domainThis field is copied from the_client-sessiontable for ease of reference or querying and also because the use of the client session is optional. CHARACTER X(35)_Audit-date-time The date and time that the audit event occurred stored asdate time timezone, which results in the time recorded to the millisecond. DATE 99/99/9999_Audit-event-group A GUID pointing at the audit data record containing the audit event group event’s details. The value is always a 22-character, BASE-64 encoded UUID.Within an application context there can exist zero or more optional audit event groups that can carry information such as the business entity, business object, or data object. Audit event groups have starting and ending events that can be used to establish a collection of related database audit events.For example, starting an update on a ProDataSet as part of a business task might change multiple table records in multiple databases. By starting and ending an audit event group around the ProDataSetUPDATEoperation, you can later audit all audit event records that were involved in that single application operation. CHARACTER X(28)_Audit-event-group(continued)Note: Audit event groups are used for auditing purposes only and do not support roll-back of data manipulation operations. The ending of an audit event group does not happen automatically, even at program exit. The application programmer must be careful to end an audit event group unless it can be assumed to include all of the audit events up to the end of the program's execution. Where an audit event group is used, its ID will point at an_aud-audit-datarecord that describes the details of the audit event group, who started it, when, etc. This field will therefore contain an_Audit-data-guidvalue as a foreign key.Starting an audit event group will create an audit data entry for the audit event group and propagate this unique ID to all connected databases with auditing enabled so they can use this in their_Audit-event-groupfield, until it is reset.This facilitates storing extra information about the audit event group without duplicating all the details onto every audit data record.Note that for the audit data record that stores the audit event group details, the_audit-event-groupfield will be blank. If any structure or subgrouping is required for audit event groups, then the_Event-contextcan be used to provide this. CHARACTER X(28)_Db-guid A globally unique identifier (GUID) for the database to support the aggregation of data across multiple databases. The value is always a 22-character, BASE-64 encoded UUID.This field is used in all audit-related tables to identify which database the audit information was recorded in. All other fields are then unique only within a specific database.Note that the database GUID might change, for example, through backup and restore or copy operations to new databases. Therefore, give careful consideration when using it. The foreign key to related tables as joins could be broken or might need to be fixed, depending on the nature of the related data. The other way to join from the_dbtable is through theRECID, which never changes but is also not globally unique; which option to use depends on the related data. CHARACTER X(28)_Transaction-id The database transaction ID for database events.For nondatabase events, this could be an application-supplied transaction sequence, such as a task ID.Note that transaction IDs are client-specific and are not unique in the database. The IDs can be reset and do not necessarily guarantee the order of the audit data. INTEGER ->>>>>>>9_Transaction-sequence The sequence of updates within a transaction ID. The sequence is incremented only for auditable events so that there are no holes in the sequence.This field allows for a finer level of granularity than the audit date and time and, therefore, supports multiple updates within a millisecond while still being able to determine the order in which the updates occurred. INTEGER ->>>>>>>9_Event-id A unique identifier for the event. This is the binary code for the event that is stored in the audit data table and referenced in code. OpenEdge Release 10.1A includes a standard set of supported event IDs, but the list can be extended by developers as required.A separate table,_aud-event, exists to define what the event IDs mean or are used for and whether the event is enabled through the audit policy tables. INTEGER ->>>>>>>9_Event-context The context within which the event occurred.For application events, this could be a particular procedure or function or an action a user was authorized to access.For database create, update, or delete events, this could simply be the table name or thedatabase.tablename followed by a delimited list of identifying field values to identify the record that was modified.For example:database.table + CHR(6) + field1value + CHR(7) + field2value + CHR(7) + field3valueThe control codeCHR(6)denotes the start of the identifying field value part of the context, and theCHR(7)is used to delimit the field values where a record is identified by more than one field.Note that the identifying fields’ values can also be stored in the child table_aud-audit-data-valueif the value was modified and the policy is configured to audit old and new values for these fields. This field does not show old and new values because it is used to locate audit changes for a specific record in a table. CHARACTER X(3000)_Event-context(continued) Note that for database events, the execution context will be written as a separate record with an event name ofpvm.appcontext. This is to avoid repeating the execution context on every audit record, writing new context details only when the execution context changes. The field_Application-context-idpoints to the record that contains the actual context.See Table A–5 for more details._Application-context-id The application context of an audit log entry is stored in a separate_aud-audit-datarecord with full details of the context, such as when it was created or by whom, for example. A special event ID is used to identify context records. The content of the context data is user-defined, and the current context is set and reset using audit context 4GL statements. The context record is stored in the database pointed at by theAUDIT-DBalias.The key to the context record is then propagated to all connected databases that have auditing enabled, and this key is written into this field as a foreign key reference to the full context data, until it is reset. CHARACTER X(28)_Application-context-id(continued) This avoids duplicating large amounts of context data on every audit data record, yet still provides an efficient way to retrieve the context from the separate context record.Note that the record that contains the details of the context data will be in the databases that have the context event ID enabled._Event-detail The detail for the event. The detail can be a stream of field values that are set to be recorded in compressed field-value mode.For database events, this would be blank, as the details of what changed are stored in the child table_aud-audit-data-valuewith a record for each modified field value.For application events, its use is user-defined. CHARACTER X(3000)_Audit-custom-detail A custom field provided to support additional audit data required by an application. CHARACTER X(3000)_Audit-data-security-level This field is copied from the_Audit-data-security-levelfield on the_aud-audit-policytable and records the data security level used for this record.The value of this field determines what information is written to the_Data-sealfield at creation time as follows:
- 0 — No additional security applied to audit data.
- 1 — Stores a message digest in the
_Data-sealfield of the audit data tables to guarantee the integrity of the data.- 2 — Stores a MAC in the
_Data-sealfield of the audit data tables to guarantee the integrity of the data. A MAC is more secure than a message digest. The MAC key to use is stored in the associated field_Audit-mac-key.The field value is used when validating audit record seals to indicate what validation method to use. INTEGER ->9_Data-seal An internally generated data integrity seal on the data. The seal guarantees the integrity of the data and ensures it has not been tampered with outside of the registered services permitted to maintain this data.This could be a message digest or a MAC, depending on the policy’s security level at the time of creation.The use of the data seal is optional. It guarantees nonrepudiation of the data but will have a cost of additional storage space and a possible impact on performance to assign a value and check the results. CHARACTER X(28)
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |